package com.vrp3d.common.enums;

/**
 * 通用信息枚举
 *
 * @author vrp3d
 */
public enum CommonEnum {

    /**
     * 通用信息
     */
    RESET_PASSWORD_DEFAULT_PASSWORD("重置密码默认密码", "vrp3d123"),
    JWT_USER_ID("token中用户id", "api_user_id"),
    JWT_USERNAME("token中username", "username"),
    JWT_ISSUE("token签发者", "ceramics"),
    JWT_SECRET("token密钥", "vrp3d.com"),
    TOKEN_NAME("token在header中的名称", "Authorization"),
    USER_TOKEN("全局唯一token在redis中的key", "USER_TOKEN_"),
    SALT_LENGTH("加密时使用盐的长度", 6),
    STATUS_DELETED("删除", "0", 0),
    STATUS_NORMAL("普通", "1", 1),
    CODING_TYPE("编码类型", "utf-8"),
    COOKIE_USER_INFO("cookie中存放用户信息", "USER_INFO"),
    USER_LANGUAGE("前端用户选择浏览语言", "User-Language"),
    REDIS_USER_LANGUAGE("redis中缓存用户选择浏览语言", "USER_LANGUAGE_"),

    SEPARATOR_COMMA("分隔符逗号", ","),
    SEPARATOR_SLASH("分隔符斜线", "/"),
    SEPARATOR_POINT("分隔符斜线", "."),

    FOLDER_ROOT("文件夹根目录", "/data"),
    FOLDER_TEMP("临时文件夹目录", "/data/temp/"),
    FOLDER_BACK_DELETED("删除备份文件夹目录", "/data/back_deleted/"),
    BOOTH_FILE_DIRECTORY("展位文件目录", "/booth/"),
    NEWS_FILE_DIRECTORY("展位文件目录", "/news/"),

    USER_PERMISSION_INFORMATION_COOKIE_EFFECTIVE_TIME("用户权限信息cookie有效时间", "7200"),
    USERNAME_REGULAR("用户名3-16位正则,不能以数字开头", "^(?![0-9])[a-zA-Z0-9_\\u4e00-\\u9fa5]{3,16}$"),
    PASSWORD_REGULAR("验证密码3选2正则,8-20位", "^(?![A-Z]+$)(?![a-z]+$)(?!\\d+$)(?![\\W_]+$)\\S{8,20}$"),
    PHONE_NUMBER_REGULAR("手机号正则", "^1(3[0-9]{3}|5[012356789][0-9]{2}|8[0-9]{3}|7([01356789][0-9]{2}|4(0[0-9]|1[0-2]|9[0-9]))|9[189][0-9]{2}|6[567][0-9]{2}|4([14]0[0-9]{3}|[68][0-9]{4}|[579][0-9]{2}))[0-9]{6}$"),
    EMAIL_REGULAR("邮箱正则", "^[*#\\u4e00-\\u9fa5 a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\\.[a-zA-Z0-9-]+)*\\.[a-zA-Z0-9]{2,6}$"),

    ALIBABA_CLOUD_SMS_RECEIPT_CODE("阿里云短信回执成功code", "OK"),

    REGISTERED_VERIFICATION_CODE("注册手机验证码5分钟失效", "REGISTERED_VERIFICATION_CODE_", 300),
    REGISTERED_ONE_MINUTE_ONE_MESSAGE("注册手机验证码一分钟最多发送1条", "REGISTERED_ONE_MINUTE_ONE_MESSAGE_"),
    REGISTERED_ONE_HOUR_FIVE_MESSAGE("注册手机验证码一小时最多发送5条", "REGISTERED_ONE_HOUR_FIVE_MESSAGE_", 5),
    REGISTERED_ONE_DAY_TEN_MESSAGE("注册手机验证码一天最多发送10条", "REGISTERED_ONE_DAY_TEN_MESSAGE_", 10),

    RECOVER_PASSWORD_VERIFICATION_CODE("找回密码手机验证码5分钟失效", "RECOVER_PASSWORD_VERIFICATION_CODE_", 300),
    RECOVER_PASSWORD_ONE_MINUTE_ONE_MESSAGE("找回密码手机验证码一分钟最多发送1条", "RECOVER_PASSWORD_ONE_MINUTE_ONE_MESSAGE_"),
    RECOVER_PASSWORD_ONE_HOUR_FIVE_MESSAGE("找回密码手机验证码一小时最多发送5条", "RECOVER_PASSWORD_ONE_HOUR_FIVE_MESSAGE_", 5),
    RECOVER_PASSWORD_ONE_DAY_TEN_MESSAGE("找回密码手机验证码一天最多发送10条", "RECOVER_PASSWORD_ONE_DAY_TEN_MESSAGE_", 10),

    NUMBER_OF_RECOVER_PASSWORD_VERIFICATION_CODE("找回密码手机/邮箱验证码位数", 6),

    AUDIO_SUFFIX("音频后缀", "mp3|wma"),
    MODEL_SUFFIX("模型压缩包后缀", "zip"),
    PICTURE_SUFFIX("图片压缩包后缀", "png|jpg|jpeg"),

    NEWS_TYPE("新闻分类", "news_type"),
    SHOWROOM_TYPE("展厅分类", "showroom_type"),

    ;

    private String description;
    private String msg;
    private Integer msgInteger;

    CommonEnum(String description, Integer msgInteger) {
        this.description = description;
        this.msgInteger = msgInteger;
    }

    CommonEnum(String description, String msg) {
        this.description = description;
        this.msg = msg;
    }

    CommonEnum(String description, String msg, Integer msgInteger) {
        this.description = description;
        this.msg = msg;
        this.msgInteger = msgInteger;
    }

    public String getDescription() {
        return description;
    }

    public String getMsg() {
        return msg;
    }

    public Integer getMsgInteger() {
        return msgInteger;
    }

}
